
// Source File Name:   FactoryValidation.java

package com.sunwayhorizo.health.hl7.factories;

import com.sunwayhorizo.health.hl7.common.Hl7Exception;
import com.sunwayhorizo.health.hl7.common.MessageUtils;
import com.sunwayhorizo.health.hl7.common.VersionInfo;
import com.sunwayhorizo.health.hl7.datatypes.II;
import com.sunwayhorizo.health.hl7.datatypes.SET_II;
import com.sunwayhorizo.health.hl7.common.RimAttributeMissingException;


import java.util.Iterator;
import java.util.Set;


public class FactoryValidation
{

    public static final String RCS_ID = "$Header: FactoryValidation.java 1.0 2006/09/13 07:56:16 amchanda noship $";
    public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: FactoryValidation.java 1.0 2006/09/13 07:56:16 amchanda noship $", "com.sunwayhorizo.health.facade.factories.comm");
    private static final String PARAMETER_KEY = "PARAM1";
    private static final String PARAMETER_MISSING_CODE = "CTB_NULL_PARAMETER";
    private static final String INVALID_OID_CODE = "CTB_CORE_INVALID_OID";
    private static final String PARAMETER_MISSING_MESSAGE = "Invalid parameter was passed into this API. Required parameter [&PARAM1] was null.";
    private static final String INVALID_OID_MESSAGE = "Objects may not be constructed with an II with the internal root.\n\nInternal Root: &PARAM1";
//    private RimServiceBean session;

    public FactoryValidation()
    {
//        session = rimservice;
    }
    

    protected Hl7Exception newParameterMissingException(String s)
    {
        String as[] = {
            "参数"
        };
        String as1[] = {
            s
        };
        String s1 = MessageUtils.getMessage("无效参数. 需要的参数为空.", as, as1);
        return new RimAttributeMissingException(as1, "RIM_NULL_PARAMETER", s1, s);
    }

    protected Hl7Exception newMethodException(String s)
    {
        String as[] = {
            "PARAM1"
        };
        String as1[] = {
            s
        };
        String s1 = MessageUtils.getMessage("Objects may not be constructed with an II with the internal root.\n\nInternal Root: &PARAM1", as, as1);
        return new RimAttributeMissingException(as1, "CORE_INVALID_OID", s1, s);
    }

}
